#include<stdio.h>
int main()
{
    int n,i;
    double sum=1.0,a=1.0;
    scanf("%d",&n);
    if(n>=0&&n<=30)
    {

        for(i=1; i<=n; i++)
            a=a*i,
            sum+=1.0/a;



    }
    printf("%.10f\n",sum);
    return 0;
}

